package homeworke.question19;

/**
 * Author：毕龙
 * Date: 2024/4/18 19:51
 */
public class Square extends Rect{
    private double x;

    public Square(double x) {
        this.x = x;
    }

    @Override
    public double area() {
        return x*x;
    }

    @Override
    public double girth() {
        return 4*x;
    }
}
